cmake_minimum_required(VERSION 2.8.12)

project(Universal-Http-Platform LANGUAGES C CXX)

set(PROJECT_ROOT_DIR ${PROJECT_SOURCE_DIR})

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)

set(CMAKE_C_FLAGS "-Wno-write-strings -Wno-writable-string")
set(CMAKE_CXX_FLAGS "-Wno-write-strings -Wno-writable-string")

if (NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE)
endif()

IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  SET(CMAKE_INSTALL_PREFIX $ENV{HOME} CACHE PATH "set default install prefix to $HOME" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

add_subdirectory(shbin)
add_subdirectory(src/util)
add_subdirectory(src/dbmysql)
add_subdirectory(src/uhp)
add_subdirectory(src/sdk/seq_sdk)
add_subdirectory(src/sdk/longpoll_sdk)
add_subdirectory(src/tools)
add_subdirectory(src/plugin/dbpool)
add_subdirectory(src/plugin/longpoll)
add_subdirectory(src/plugin/sequence)


